package com.xinqi.modules.chat.enums.apply;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.xinqi.common.base.enums.BasicEnum;
import lombok.Getter;

public enum FriendApplyStatusEnum implements BasicEnum {
    ZERO(0, "未处理"),
    ONE(1, "已同意"),
    TWO(2, "已拒绝"),
    THREE(3, "已过期");
    @Getter(onMethod_ = {@JsonValue})
    private final int code;

    @Getter
    private final String describe;

    FriendApplyStatusEnum(int code, String describe) {
        this.code = code;
        this.describe = describe;
    }

    @JsonCreator
    public static FriendApplyStatusEnum of(Integer code) {
        return BasicEnum.of(FriendApplyStatusEnum.class, code);
    }
}
